const fs = require('fs');
const path = require('path');


fs.readFile(path.join(__dirname, '01.txt'),(err, data) => {
    if(err){return;}

    // console.log("data ---->",data);

})

let arr = ['61','62','63','64','65','66','67','68'];
var a = parseInt(arr[0],16).toString(2);//转换为二进制
//console.log(a);//1100001

const buf2 = Buffer.from('abcd','utf8');
const buf3 = Buffer.from('哈哈','utf8');

console.log('buf2 ---->',buf2.toString());//abcd

let buf4 = Buffer.alloc(5);
buf4.write('abcdefg',2,5);
console.log(buf4.toString());//abc

const buf5 = Buffer.from('tést');
console.log(' buf3---->', buf5.toString());//tést

var buffer1 = Buffer.from(('菜鸟教程'));
var buffer2 = Buffer.from(('www.baodu.com'));
var buffer3 = Buffer.concat([buffer1, buffer2]);
console.log("buffer3内容："+buffer3.toString())

